package cn.com.wxd.service.dispatch.engine;

import java.io.Serializable;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.com.wxd.common.file.ReadConfigFile;

/**
 * Created by ComXu on 2017/5/18.
 */
public class CustomConfigInfo implements Serializable {
    private static final Logger log = LoggerFactory.getLogger(CustomConfigInfo.class);
    private static String loggerDirPath;
    private static boolean isWriteFile;

    static {
        init();
    }

    public static void init() {
        Map<String, String> conf = ReadConfigFile.readPropertiesConfig("wxd.customtask");
        if(conf != null){
            loggerDirPath = conf.get("CustomTask_Logger_DirPath");
            isWriteFile = Boolean.parseBoolean(conf.get("CustomTask_IsWriteFile"));
        }
    }

    public static String getLoggerDirPath() {
        return loggerDirPath;
    }

    public static boolean isWriteFile() {
        return isWriteFile;
    }

}
